package 
{
	import flash.display.Sprite;
	import fr.babos.core.bootstrap.Bootstrap;
	import fr.babos.core.context.DependencesManager;
	
	
	public class DocumentClass
	{
		public function DocumentClass ()
		{
			// NOUS SOMME DANS UN BUNDLE
			
			// Le bundler a un container
			var container:Sprite;
			
			// Le bundle a un manager de dépendances
			var dependencesManager:DependencesManager = new DependencesManager();
			
			// Le bundle a un bootstrap
			var bootstrap:Bootstrap = new Bootstrap();
			
			// Fonction init du bundle
			
			// Gérer les dépendences du bundle
			
			// dependencesManager.addModel(pClass:Class, pSingleton:Boolean);
			// dependencesManager.addView(pClass:Class, pSingleton:Boolean);
			// dependencesManager.addController(pClass:Class, pSingleton:Boolean);
			
			//dependencesManager.addController(com.monsite.www.controllers.NewsController);
			
			// Gérer les commandes
			bootstrap.commands = {
				Commands.NEWS_TRUC_COMMAND : {
					controller: NewsController,
					action: "index",
					views: [SuperView, SuperView2]
				},
				
				/*
				Commands.NEWS_INDEX_COMMAND : {
					controller: 'NewsController',
					action: "index",
					view: 'NewsView',
					state: 'list',
					//level: 0
					//transition: Transitions.CROSS
				},
				
				Commands.NEWS_CATEGORY_COMMAND : {
					controller: com.monsite.www.controllers.NewsController,
					action: "category",
					view: com.monsite.www.views.news.NewsView,
					state: 'list',
					//level: 
				},
				
				Commands.NEWS_VIEW_COMMAND : {
					controller: com.monsite.www.controllers.NewsController,
					action: "view",
					view: com.monsite.www.views.news.NewsView,
					state: 'list',
				},
				*/
				/**
				 * Charger un SWF à l'arrache
				 */
				Commands.NEWS_VIEW_COMMAND: {
					swf: "/swf/news.swf"
				}
				
				/**
				 * UberBootstrap extends Bootstrap
				 * 
					Commands.NEWS_INDEX_COMMAND : {
						controllers: [
							{
								name: com.monsite.www.controllers.NewsController,
								action: "index"
							}
						],
						views: [
							{
								name: com.monsite.www.views.news.NewsView1,
								state: 'state'
							},
							{
								name: com.monsite.www.views.news.NewsView2,
								state: 'state'
							}
						]
					},
				 */
			};
			
			NavigationBootstrap.transitions = [
				{
					from: ""
				}
			];
		}
	}
}
/*
public class Transitions
{
	public static const CROSS:String = "CROSS";
	public static const SEQUENCE:String = "SEQUENCE";
}

public class Commands
{
	public static const NEWS_INDEX_COMMAND:String = "News.index";
	public static const NEWS_CATEGORY_COMMAND:String = "News.viewCategory";
	public static const NEWS_VIEW_COMMAND:String = "News.viewNews";
}
*/